Skip to contentSkip to conversation

Change in openvpn[master]: win: remove checks for PATHCCH_ENSURE_TRAILING_SLASH

Openvpn-devel In review d12fk (Code Review) 2 participants 6 messages Nov 6, 2025 – Nov 12, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1762462761000.I50f189048ef1a624e6ac84b71d7b22fcbbc3ab6b@...2715...

#1 lore raw

Attention is currently required from: flichtenheld, plaisthos.

Hello plaisthos, flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1354?usp=email

to review the following change.

Change subject: win: remove checks for PATHCCH_ENSURE_TRAILING_SLASH
......................................................................

win: remove checks for PATHCCH_ENSURE_TRAILING_SLASH

Since the define is no longer used, remove configuration-time checks if it exists, and also code dealing with situations where it doesn't.

Change-Id I50f189048ef1a624e6ac84b71d7b22fcbbc3ab6b

---
M configure.ac
M src/openvpnserv/CMakeLists.txt
M src/openvpnserv/validate.c

3 files changed, 0 insertions(+), 18 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/54/1354/1

configure.ac +0 -11
index 3117e13..8f3c01d 100644
@@ -1383,17 +1383,6 @@
 	fi
 fi
 
-if test "${WIN32}" == "yes"; then
-	AC_CHECK_DECLS(
-		[PATHCCH_ENSURE_TRAILING_SLASH],
-		[AC_DEFINE([HAVE_PATHCCH_ENSURE_TRAILING_SLASH], [1], [PATHCCH_ENSURE_TRAILING_SLASH is defined])],
-		,
-		[[
-			#include <pathcch.h>
-		]]
-	)
-fi
-
 # When testing a compiler option, we add -Werror to force
 # an error when the option is unsupported. This is not
 # required for gcc, but some compilers such as clang need it.
src/openvpnserv/CMakeLists.txt +0 -3
index a92ee08..2c8f310 100644
@@ -8,9 +8,6 @@
 
 include(CheckSymbolExists)
 
-# Some old versions of mingw does not have PATHCCH_OPTIONS enums -- add a check
-check_symbol_exists(PATHCCH_ENSURE_TRAILING_SLASH pathcch.h HAVE_PATHCCH_ENSURE_TRAILING_SLASH)
-
 set(MC_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}/mc)
 
 target_include_directories(openvpnserv PRIVATE
src/openvpnserv/validate.c +0 -4
index 4eb3141..b674058 100644
@@ -27,10 +27,6 @@
 #include <pathcch.h>
 #include <lm.h>
 
-#ifndef HAVE_PATHCCH_ENSURE_TRAILING_SLASH
-#define PATHCCH_ENSURE_TRAILING_SLASH 0x20
-#endif
-
 static const WCHAR *white_list[] = {
     L"auth-retry",
     L"config",

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1354?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I50f189048ef1a624e6ac84b71d7b22fcbbc3ab6b
Gerrit-Change-Number: 1354
Gerrit-PatchSet: 1
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: d12fk, flichtenheld, plaisthos.

stipa has posted comments on this change by d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1354?usp=email )

Change subject: win: remove checks for PATHCCH_ENSURE_TRAILING_SLASH
......................................................................

Patch Set 5: Code-Review+2

(1 comment)

Patchset:

PS5:
Looks good. No real code code changes. Checked that PATHCCH_ENSURE_TRAILING_SLASH is indeed not used.

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1354?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I50f189048ef1a624e6ac84b71d7b22fcbbc3ab6b
Gerrit-Change-Number: 1354
Gerrit-PatchSet: 5
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: d12fk <[email protected]...>
Gerrit-Comment-Date: Wed, 12 Nov 2025 09:19:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

#3 lore raw

PATCH v5 1/1 win: remove checks for PATHCCH_ENSURE_TRAILING_SLASH

In reply to a message not in the archive

From: Heiko Hund <[email protected]...>

Since the define is no longer used, remove configuration-time checks if it exists, and also code dealing with situations where it doesn't.

Change-Id I50f189048ef1a624e6ac84b71d7b22fcbbc3ab6b

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1354
---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1354
This mail reflects revision 5 of this Change.

Acked-by according to Gerrit (reflected above):
Lev Stipakov <[email protected]...>

configure.ac +0 -11
index 3117e13..8f3c01d 100644
@@ -1383,17 +1383,6 @@
 	fi
 fi
 
-if test "${WIN32}" == "yes"; then
-	AC_CHECK_DECLS(
-		[PATHCCH_ENSURE_TRAILING_SLASH],
-		[AC_DEFINE([HAVE_PATHCCH_ENSURE_TRAILING_SLASH], [1], [PATHCCH_ENSURE_TRAILING_SLASH is defined])],
-		,
-		[[
-			#include <pathcch.h>
-		]]
-	)
-fi
-
 # When testing a compiler option, we add -Werror to force
 # an error when the option is unsupported. This is not
 # required for gcc, but some compilers such as clang need it.
src/openvpnserv/CMakeLists.txt +0 -3
index a92ee08..2c8f310 100644
@@ -8,9 +8,6 @@
 
 include(CheckSymbolExists)
 
-# Some old versions of mingw does not have PATHCCH_OPTIONS enums -- add a check
-check_symbol_exists(PATHCCH_ENSURE_TRAILING_SLASH pathcch.h HAVE_PATHCCH_ENSURE_TRAILING_SLASH)
-
 set(MC_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}/mc)
 
 target_include_directories(openvpnserv PRIVATE
src/openvpnserv/validate.c +0 -4
index 2dcfe1a..b3189b7 100644
@@ -27,10 +27,6 @@
 #include <pathcch.h>
 #include <lm.h>
 
-#ifndef HAVE_PATHCCH_ENSURE_TRAILING_SLASH
-#define PATHCCH_ENSURE_TRAILING_SLASH 0x20
-#endif
-
 static const WCHAR *white_list[] = {
     L"auth-retry",
     L"config",
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: win: remove checks for PATHCCH_ENSURE_TRAILING_SLASH

Yeah, that looks a bit silly in retrospective... adding it for Cmake, fixing it for autoconf, and then ripping it out again... but in the end, the code is nicer this way, and we all learn on the journey ;-)

Sanity compiled on ubuntu 24.04 / mingw.

Your patch has been applied to the master branch.

commit 763160a16a8910d039cdb2359b10ec61b8041e4b

Author: Heiko Hund
Date:   Wed Nov 12 10:22:10 2025 +0100
     win: remove checks for PATHCCH_ENSURE_TRAILING_SLASH

     Signed-off-by: Heiko Hund <[email protected]...>
     Acked-by: Lev Stipakov <[email protected]...>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1354
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg34335.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#6) to the change originally created by d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1354?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by stipa

Change subject: win: remove checks for PATHCCH_ENSURE_TRAILING_SLASH
......................................................................

win: remove checks for PATHCCH_ENSURE_TRAILING_SLASH

Since the define is no longer used, remove configuration-time checks if it exists, and also code dealing with situations where it doesn't.

Change-Id I50f189048ef1a624e6ac84b71d7b22fcbbc3ab6b

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1354
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg34335.html

---
M configure.ac
M src/openvpnserv/CMakeLists.txt
M src/openvpnserv/validate.c

3 files changed, 0 insertions(+), 18 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/54/1354/6

configure.ac +0 -11
index f6e4b6d..44c7b65 100644
@@ -1383,17 +1383,6 @@
 	fi
 fi
 
-if test "${WIN32}" == "yes"; then
-	AC_CHECK_DECLS(
-		[PATHCCH_ENSURE_TRAILING_SLASH],
-		[AC_DEFINE([HAVE_PATHCCH_ENSURE_TRAILING_SLASH], [1], [PATHCCH_ENSURE_TRAILING_SLASH is defined])],
-		,
-		[[
-			#include <pathcch.h>
-		]]
-	)
-fi
-
 # When testing a compiler option, we add -Werror to force
 # an error when the option is unsupported. This is not
 # required for gcc, but some compilers such as clang need it.
src/openvpnserv/CMakeLists.txt +0 -3
index a92ee08..2c8f310 100644
@@ -8,9 +8,6 @@
 
 include(CheckSymbolExists)
 
-# Some old versions of mingw does not have PATHCCH_OPTIONS enums -- add a check
-check_symbol_exists(PATHCCH_ENSURE_TRAILING_SLASH pathcch.h HAVE_PATHCCH_ENSURE_TRAILING_SLASH)
-
 set(MC_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}/mc)
 
 target_include_directories(openvpnserv PRIVATE
src/openvpnserv/validate.c +0 -4
index 2dcfe1a..b3189b7 100644
@@ -27,10 +27,6 @@
 #include <pathcch.h>
 #include <lm.h>
 
-#ifndef HAVE_PATHCCH_ENSURE_TRAILING_SLASH
-#define PATHCCH_ENSURE_TRAILING_SLASH 0x20
-#endif
-
 static const WCHAR *white_list[] = {
     L"auth-retry",
     L"config",

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1354?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I50f189048ef1a624e6ac84b71d7b22fcbbc3ab6b
Gerrit-Change-Number: 1354
Gerrit-PatchSet: 6
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1354?usp=email )

Change subject: win: remove checks for PATHCCH_ENSURE_TRAILING_SLASH
......................................................................

win: remove checks for PATHCCH_ENSURE_TRAILING_SLASH

Since the define is no longer used, remove configuration-time checks if it exists, and also code dealing with situations where it doesn't.

Change-Id I50f189048ef1a624e6ac84b71d7b22fcbbc3ab6b

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1354
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg34335.html

---
M configure.ac
M src/openvpnserv/CMakeLists.txt
M src/openvpnserv/validate.c

3 files changed, 0 insertions(+), 18 deletions(-)
configure.ac +0 -11
index f6e4b6d..44c7b65 100644
@@ -1383,17 +1383,6 @@
 	fi
 fi
 
-if test "${WIN32}" == "yes"; then
-	AC_CHECK_DECLS(
-		[PATHCCH_ENSURE_TRAILING_SLASH],
-		[AC_DEFINE([HAVE_PATHCCH_ENSURE_TRAILING_SLASH], [1], [PATHCCH_ENSURE_TRAILING_SLASH is defined])],
-		,
-		[[
-			#include <pathcch.h>
-		]]
-	)
-fi
-
 # When testing a compiler option, we add -Werror to force
 # an error when the option is unsupported. This is not
 # required for gcc, but some compilers such as clang need it.
src/openvpnserv/CMakeLists.txt +0 -3
index a92ee08..2c8f310 100644
@@ -8,9 +8,6 @@
 
 include(CheckSymbolExists)
 
-# Some old versions of mingw does not have PATHCCH_OPTIONS enums -- add a check
-check_symbol_exists(PATHCCH_ENSURE_TRAILING_SLASH pathcch.h HAVE_PATHCCH_ENSURE_TRAILING_SLASH)
-
 set(MC_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}/mc)
 
 target_include_directories(openvpnserv PRIVATE
src/openvpnserv/validate.c +0 -4
index 2dcfe1a..b3189b7 100644
@@ -27,10 +27,6 @@
 #include <pathcch.h>
 #include <lm.h>
 
-#ifndef HAVE_PATHCCH_ENSURE_TRAILING_SLASH
-#define PATHCCH_ENSURE_TRAILING_SLASH 0x20
-#endif
-
 static const WCHAR *white_list[] = {
     L"auth-retry",
     L"config",

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1354?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I50f189048ef1a624e6ac84b71d7b22fcbbc3ab6b
Gerrit-Change-Number: 1354
Gerrit-PatchSet: 6
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>